home *** CD-ROM | disk | FTP | other *** search
- Several people were changing the output image format
- of the decoder or asked for a different output format.
-
- pbmplus enables the transformation to every image
- format, but sometimes it is better to have the
- format "inside". Therefore v0.4 is able to keep several
- format 'drivers'.
-
-
- To add a new output format:
-
- - Append a new tag to the enum type OUTFOR in hpcdtoppm.h
-
- - change O_DEFAULT to this tag in config.h if you want to
- have this format as the default format.
-
- - Insert a new 'if(...{...}' contruct to the procedure
- parseargs in main.c after the comment "Output options".
-
- - Insert description text to error.c and hpcdtoppm.man.
-
- - If your format needs only grayscale data, append your
- tag to the line "monochrome=(outfor==O_PGM)|| ..."
- in the main procedure in main.c .
-
- - Insert your tag into the switch-statement in the
- procedure colconvert in color.c. If you need a
- 8-bit-grayscale or 24-bit-rgb model, you just
- have to insert a "case O_YourTag :" . Otherwise
- you have to write your own colorconversion.
-
- - Insert your tag into the switch-statement in the
- procedure colconvert in output.c. If you have
- a three-plane-image you can use the do_3plane
- procedure with a pointer to your format writing
- procedure as the first argument, if you have one
- image plane, use the do_1plane. Otherwise write
- a similar do_nplane procedure.
-
- - Write a procedure, which produces your format. You
- should use the same parameter scheme as the included
- procedures (read ppm.c).
-
- This means:
- -image width and height.
-
- - for each image plane the triple:
- - a pointer to the upper left position
- - a relative row step ( in bytes )
- - a relative column step ( in bytes )
-
-
-
-
- Hadmut
-
-
-
-
-